package main

func totalMoney(n int) int {
	oneDay := 0
	dayX := 0
	rst := 0
	for i := 1; i <= n; i++ {
		if i%7 == 1 {
			oneDay = oneDay + 1
			dayX = oneDay
		}
		rst += dayX
		dayX += 1
	}
	return rst
}
